package com.czkt.filter;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterRegister {

    @Bean
//    @Order(1)
    public FilterRegistrationBean filterRegistrationBean(){

        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(new AutoFilter());
        registration.addUrlPatterns("/*");
        return registration;
    }
}
